#ifndef SUDOKUCELLSIGNALS_H
#define SUDOKUCELLSIGNALS_H

#include <QObject>
#include "sudoku_ui_global.h"

namespace sudoku_ui
{
    class SudokuCell;
    class NineSquareGrid;
    class SUDOKU_UI_EXPORT SudokuCellSignals : public QObject
    {
        Q_OBJECT
    public:        
        virtual ~SudokuCellSignals();

        static SudokuCellSignals* globalInstance();
        static void selectedSudokuCell(SudokuCell * cell = nullptr);
        static void selectedNineSquareGrid(NineSquareGrid * grid = nullptr);
        static void checkGame();
        static void checkGame(int row, int col, int num);
        static void removeSudokuCell(int num, SudokuCell * cell);
        static void appendSudokuCell(int num, SudokuCell * cell);

    private:
        explicit SudokuCellSignals(QObject *parent = nullptr);
        static SudokuCellSignals g_instance;

    signals:
        void selectedCell(SudokuCell * cell);
        void selectedNineGrid(NineSquareGrid * grid);
        void check();
        void checkNum(int row, int col, int num);
        void removeCell(int num, SudokuCell * cell);
        void appendCell(int num, SudokuCell * cell);
    };
}



#endif // SUDOKUCELLSIGNALS_H
